package com.wing.device.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wing.device.dao.MaintenanceClaimDao;
import com.wing.device.model.entity.Maintenance;
import com.wing.device.model.entity.MaintenanceClaim;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @version 1.1.0
 * @Author hz
 * @Date 2024-08-21 19:13
 **/
@Service
@Slf4j
public class DeviceMaintenanceClaimServiceImpl extends ServiceImpl<MaintenanceClaimDao, MaintenanceClaim> implements DeviceMaintenanceClaimService{
    /**
     * 查询认领记录列表
     * @param pg
     * @param map
     * @return
     */
    @Override
    public IPage<Maintenance> pageList4app(@Param("page") Page<Maintenance> pg, @Param("map") Map map) {
        List<Maintenance> list = baseMapper.list4app(pg, map);
        pg.setRecords(list);
        return pg;
    }
}
